{% if section.page_id %}
{% get_product product_id={section.page_id} body_html=1 %}
{% assign product_detail = product %}
{% assign payment = section.params.payment %}
{% assign comments = comments | default : section.params.comments %}
{% endif %}


<style>

  .product_detail_default {
    margin: 0 auto;
  }
  
  .product_detail_default .product-info-subtitle {
    text-align: center;
    margin-bottom: 12px;
    color: var(--title_color);
    font-size: var(--product_font_size);
  }
  
  .product_detail_default .product-warp {
    margin: 60px auto 0 auto;
    max-width: var(--general_layout_width);
  }

  
  .product_detail_default .product-warp .product-left{
    position: relative;
  }
  .product_detail_default .product-info-describe {
    text-align: center;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--detail_color);
  }
  
  .product-swiper-small .arrow {
    padding: 0 12px;
    display: none;
    font-size: 0;
  }
  
  .cell-star {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
  }
  
  .product-comment-fraction {
    display: flex;
    align-items: center;
  }
  
  .product-comment-fraction svg {
    margin-right: 4px;
  }
  
  .product-comment-fraction > svg:last-child {
    margin-right: 0;
  }
  
  .product-comment-fraction span {
    font-weight: 500;
    color: #1d1f21;
    font-size: 18px;
    line-height: 1;
    margin-left: 6px;
  }
  
  .comment-star-warp {
      position: relative;
    display: flex;
    align-items: center;
  }
  
  .comment-star-warp-choose {
      position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
  }
  
  .product_detail_default .product-card-bottom {
    margin: 16px auto 0 auto;
    max-width: var(--general_layout_width);
  }
  
  .comment-star-warp-choose svg {
    flex-shrink: 0;
  }
  
  .product_detail_default .swiper-button-disabled path {
    fill: #999999;
  }
  
  @media (max-width: 767px) {
    .product-swiper-small .arrow {
      display: inline-block;
    }
    .product-swiper-small {
      display: flex;
      justify-content: space-between;
      padding: 15px 0;
    }
    /* .product-swiper-small .swiper-container-small {
              display: flex;
              justify-content: center;
          } */
    .product-swiper-small .swiper-container-small .swiper-small-item {
      width: 10px;
      height: 10px;
      border: 2px solid var(--color-main);
      border-radius: 50%;
      box-sizing: border-box;
    }
    .product-swiper-small .swiper-container-small .swiper-small-item:last-child {
      margin-right: 0 !important;
    }
    .product-swiper-small .swiper-container-small .active {
      border: 2px solid var(--color-main);
      background-color: var(--color-main);
    }
    .product-swiper-small .swiper-container-small .swiper-small-item img {
      display: none;
    }
    .product-swiper-small .swiper-container-small .swiper-small-item .video-icon {
      display: none;
    }
  }
  
  .product_detail_default .product-right .secondary_btn, .product_detail_default .product-right .main_btn {
    margin-top: 0;
      position: relative;
    z-index: 100;
  }
  
  .product_detail_default .comment_warp-empty {
    /* text-align: center;
          height: 60px;
          line-height: 60px;
          font-size: 16px; */
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
  }
  
  .product_detail_default .comment_warp-empty span {
    color: #888888;
    font-size: 14px;
    line-height: 18px;
    margin-top: 20px;
  }
  
  .product_detail_default .cell-item {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  .product-router-nav {
    /* align-items: center; */
    color: #737373;
    font-size: 14px;
    line-height: 22px;
    flex-wrap: wrap;
    padding: 16px 0;
    background: #F6F6F6;
  }
  
  .product-router-nav-warp {
    margin: 0 auto;
    max-width: var(--general_layout_width);
  }
  
  .product-router-nav a {
    color: #999999;
    font-size: 14px;
    line-height: 17px;
  }
  
  .product-router-nav .on {
    color: #666666;
    overflow: hidden;
  }
  
  .product-router-nav span {
    padding: 0 4px;
  }
  .product_detail_default .product-tabs .product-tabs-item,.product_detail_default .module-box .module-cell-header .module-cell-tile{
    font-size: var(--product_font_size);
  }
  
  


  .product-wishlist{
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 14px;
    gap: 10px;
    cursor: pointer;
  }
  .cell-star >div:not([hidden])~:not([hidden]){
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid #dddddd;
  }

  .product-preview-wishlist{
    position: absolute;
    top: 15px;
    right:  15px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    opacity: 0.9;
    border-radius: 50%;
    display: none;
    
  }

  @media screen and (min-width: 846px) and (max-width: 1200px) {
    .product-router-nav {
      padding: 16px 30px;
    }
  }

  @media screen and (max-width: 845px) {
    .product-router-nav ,.product-wishlist{
      display: none;
    }
    .product-preview-wishlist{
      display: flex;
    }
  }
 

  .wishlist-box:active svg{
    animation: wishlistShow 0.7s ease-in-out;
  }
  .wishlist-box .active{
    display: none;
  }
  .wishlist-box .no{
    display: block;
  }
  .product-wishlist-active .active{
    display: block;
  }
  .product-wishlist-active .no{
    display: none;
  }



  .product-grid{
    display: flex;
    flex-direction: column;
  }
  
  .product-preview{
    grid-area: preview;
    width: 100% !important;
    position: relative;
  }
  .product-tabs-card,.product-info{
    width: 100% !important;
    padding: 0 15px !important;
    box-sizing: border-box;
    position: relative;
  }
  .product-info{
    grid-area: info;
  }
  .product-tabs-card{
    grid-area: tabs;
    width: 100% !important;
  }
  @media (min-width: 767px) {
    .product-grid{
      display: grid !important;
      grid-template-rows: auto 1fr;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      column-gap:50px;
    }
    .product-grid-bottom{
      grid-template-areas:
          "preview info"
          "tabs tabs";
    }
    .product-grid-right{
      grid-template-areas:
          "preview info"
          "preview tabs";
    }
    .product-tabs-card,.product-info{
      padding: 0 !important;
    }
    .moi-tabs-style-accordion{
      max-width: 60vw;
      margin: 0 auto;
    }
  }
</style>
{% unless section.settings.bread_crumbs %}
<style>
  .product-router-nav{
    display:none !important;
  }
</style>
{% endunless %}

{%- if section.settings.mobile_bread_crumbs -%}
  <style>
    @media screen and (max-width: 767px) {
      .product-router-nav{
        display: block !important;
        padding: 16px 15px;
      }
      .product-router-nav .product-router-nav-warp {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
      }
    }
  </style>
{%- endif -%}


<div class="product_detail_default product_detail-card-bottom" id="product_detail">
 
  <div class="plugin-container-header"></div>

      <div class="product-warp product-grid product-grid-{{section.settings.position| default:'bottom'}}">
      <div class="product-left product-preview"  id="control-product_detail-main_picture" {% if product_detail.images.size == 1 %} style="margin-bottom:12px"  {% endif %}>
        <div class="product-right-sticky" style="--img-radius: {{ section.settings.img_radius }}px;">
          {%- assign productId = product_detail.id | default: block_id  -%}
          {%- case section.settings.image_type -%}
              {%- when "img2tiledown" -%}
                {% include 'product_preview_img2_tiledown', previewImage:product_detail.images ,productId: productId,source:"product_detail", mobile_thumbnail: section.settings.mobile_thumbnail %}
              {%- when "tiledown" -%}
                  {% include 'product_preview_tiledown', previewImage:product_detail.images ,productId: productId,source:"product_detail", mobile_thumbnail: section.settings.mobile_thumbnail %}
              {%- when "bigtiledown" -%}
                  {% include 'product_preview_bigtiledown', previewImage:product_detail.images ,productId: productId ,source:"product_detail", mobile_thumbnail: section.settings.mobile_thumbnail %}
              {%- when "right" -%}
                  {% include 'product_preview_right', previewImage:product_detail.images ,productId: productId,blockId:block_id,  showSmall:true,source:"product_detail", mobile_thumbnail: section.settings.mobile_thumbnail  %}
              {%- when "left" -%}
                  {% include 'product_preview_left', previewImage:product_detail.images ,productId: productId,blockId:block_id,  showSmall:true ,source:"product_detail", mobile_thumbnail: section.settings.mobile_thumbnail %}
              {%- else -%}
                  {% include 'product_preview', previewImage:product.images ,productId: productId, blockId:block_id, showSmall:true,source:"product_detail", mobile_thumbnail: section.settings.mobile_thumbnail %}
          {%- endcase -%}
        </div>
        {% if storeConfig.wishlist_enable == '1' %}
        <div class="product-preview-wishlist wishlist-box {% if product_detail.in_wishlist == 1 %}product-wishlist-active{% endif %}">
            <div class="wishlist-animated">
              <svg t="1679540869726" class="no" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4980" width="18" height="18"><path d="M754.451692 157.696a188.022154 188.022154 0 0 0-28.672 2.244923 304.521846 304.521846 0 0 0-143.675077 71.483077l-50.451692 42.023385-50.412308-42.023385a304.167385 304.167385 0 0 0-143.635692-71.443692 188.258462 188.258462 0 0 0-28.672-2.244923 179.042462 179.042462 0 0 0-127.448615 55.138461 200.231385 200.231385 0 0 0-62.306462 165.888 325.474462 325.474462 0 0 0 106.338462 194.520616l196.371692 192.196923 109.804308 107.95323 31.074461-30.483692 87.630769-86.016 27.569231-27.096615c81.959385-80.344615 138.712615-135.995077 159.940923-156.672a325.395692 325.395692 0 0 0 106.338462-194.402462 200.270769 200.270769 0 0 0-62.306462-165.888 179.042462 179.042462 0 0 0-127.40923-55.138461m0-78.769231a257.693538 257.693538 0 0 1 182.390153 77.627077 278.016 278.016 0 0 1 85.700923 230.242461 402.195692 402.195692 0 0 1-129.614769 242.845539c-21.149538 20.637538-78.099692 76.406154-159.744 156.514461-36.745846 36.036923-75.815385 74.358154-115.2 113.073231l-53.523692 52.499692a46.788923 46.788923 0 0 1-65.575385 0l-160.17723-157.538461-168.290462-164.745846a402.077538 402.077538 0 0 1-129.575385-242.845539 277.937231 277.937231 0 0 1 85.700923-230.242461A255.409231 255.409231 0 0 1 349.696 81.92a379.864615 379.864615 0 0 1 182.075077 88.772923 380.179692 380.179692 0 0 1 182.075077-88.772923 265.964308 265.964308 0 0 1 40.605538-2.993231z" p-id="4981"></path></svg>
              <svg t="1679638623967" class="active" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6079" width="18" height="18"><path fill="#F11752" d="M713.728 81.959385a255.330462 255.330462 0 0 1 223.074462 74.476307 278.016 278.016 0 0 1 85.700923 230.242462 402.195692 402.195692 0 0 1-129.61477 242.845538c-21.149538 20.637538-78.099692 76.406154-159.744 156.514462-36.745846 36.036923-75.815385 74.358154-115.2 113.073231l-38.32123 37.572923-15.202462 14.926769a46.788923 46.788923 0 0 1-65.575385 0l-132.253538-129.969231-27.923692-27.372308-168.290462-164.745846a402.077538 402.077538 0 0 1-129.575384-242.845538 277.937231 277.937231 0 0 1 85.700923-230.242462 255.409231 255.409231 0 0 1 223.074461-74.476307 379.864615 379.864615 0 0 1 182.075077 88.772923 380.179692 380.179692 0 0 1 182.075077-88.772923z" p-id="6080"></path></svg>
            </div>
        </div>
        {% endif %}

      </div>
      <div class="product-right product-info {{theme_config.global.product_right_float}}" id="sku-option-{{ block_id | default : section.block_id }}">
          <div class="product-right-sticky">
          <!-- title -->
          <div class="plugin-product_detail-title_top" data-product-id="{{product_detail.id}}"></div>
          {% if product_detail.subtitle %}
            <div class="product-info-subtitle control-product_detail-subtitle">{{ product_detail.subtitle }}</div>
          {% endif %}
          <div class="product-name">
              <h1 class="control-product_detail-title">{{ product_detail.title }}</h1>
              <div class="cell-star control-product_detail-comment_star">
                {% include 'fake_score', product_detail: product_detail %}
                {% if storeConfig.wishlist_enable == '1' %}
                <div class='product-wishlist wishlist-box {% if product_detail.in_wishlist == 1 %}product-wishlist-active{% endif %}'>
                    <span class="wishlist-animated">
                            <svg t="1679540869726" class="no" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4980" width="18" height="18"><path d="M754.451692 157.696a188.022154 188.022154 0 0 0-28.672 2.244923 304.521846 304.521846 0 0 0-143.675077 71.483077l-50.451692 42.023385-50.412308-42.023385a304.167385 304.167385 0 0 0-143.635692-71.443692 188.258462 188.258462 0 0 0-28.672-2.244923 179.042462 179.042462 0 0 0-127.448615 55.138461 200.231385 200.231385 0 0 0-62.306462 165.888 325.474462 325.474462 0 0 0 106.338462 194.520616l196.371692 192.196923 109.804308 107.95323 31.074461-30.483692 87.630769-86.016 27.569231-27.096615c81.959385-80.344615 138.712615-135.995077 159.940923-156.672a325.395692 325.395692 0 0 0 106.338462-194.402462 200.270769 200.270769 0 0 0-62.306462-165.888 179.042462 179.042462 0 0 0-127.40923-55.138461m0-78.769231a257.693538 257.693538 0 0 1 182.390153 77.627077 278.016 278.016 0 0 1 85.700923 230.242461 402.195692 402.195692 0 0 1-129.614769 242.845539c-21.149538 20.637538-78.099692 76.406154-159.744 156.514461-36.745846 36.036923-75.815385 74.358154-115.2 113.073231l-53.523692 52.499692a46.788923 46.788923 0 0 1-65.575385 0l-160.17723-157.538461-168.290462-164.745846a402.077538 402.077538 0 0 1-129.575385-242.845539 277.937231 277.937231 0 0 1 85.700923-230.242461A255.409231 255.409231 0 0 1 349.696 81.92a379.864615 379.864615 0 0 1 182.075077 88.772923 380.179692 380.179692 0 0 1 182.075077-88.772923 265.964308 265.964308 0 0 1 40.605538-2.993231z" p-id="4981"></path></svg>
                            <svg t="1679638623967" class="active" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6079" width="18" height="18"><path fill="#F11752" d="M713.728 81.959385a255.330462 255.330462 0 0 1 223.074462 74.476307 278.016 278.016 0 0 1 85.700923 230.242462 402.195692 402.195692 0 0 1-129.61477 242.845538c-21.149538 20.637538-78.099692 76.406154-159.744 156.514462-36.745846 36.036923-75.815385 74.358154-115.2 113.073231l-38.32123 37.572923-15.202462 14.926769a46.788923 46.788923 0 0 1-65.575385 0l-132.253538-129.969231-27.923692-27.372308-168.290462-164.745846a402.077538 402.077538 0 0 1-129.575384-242.845538 277.937231 277.937231 0 0 1 85.700923-230.242462 255.409231 255.409231 0 0 1 223.074461-74.476307 379.864615 379.864615 0 0 1 182.075077 88.772923 380.179692 380.179692 0 0 1 182.075077-88.772923z" p-id="6080"></path></svg>
                    </span>
                    <span style="user-select:none;">{{lang.product.wishlist | default :"wishlist"}}</span>
                </div>
                {% endif %}

              </div>
          </div>
          
          {% comment %} sku spu控制 {% endcomment %}
          {% include 'product_sku_spu_show', className:"product-info-describe control-product_detail-subtitle",style:"",spu:product_detail.spu,sku:product_detail.variant.sku %}

          {% if product_detail.mini_detail %}
          <div class="product-info-describe control-product_detail-describe">{{ product_detail.mini_detail | newline_to_br }}</div>
          {% endif %}

          <!-- sku -->
          <div class="product-sku">
              <div class="cell-item control-product_detail-price_box" id="plugin-product-price" style="margin-top: 0">
                  <div class="product-price">
                      <div class="product-price-number general_buying-color"></div>
                      <div class="product-price-market general_original-color"></div>
                      {%- if theme_config.global.product_discount_label_style_switch -%}
                      <div class="product-price-discount"></div>
                      {%- endif -%}
                  </div>
              </div>
              {%- if product_detail.virtual_sale_count -%}
                <div class="product-info-describe virtual_sale control-product_detail-virtual_sale">{{ product_detail.virtual_sale_count | plus: product_detail.sale_count }} {{lang.product.sold}}</div>
              {%- endif -%}
              <div class="plugin-product_detail-price_bottom"  data-product-id="{{product_detail.id}}"></div>
              <div class="sku-cell control-product_detail-sku_box"></div>
              <div class="plugin-product_detail-quantity_top" data-product-id="{{product_detail.id}}"></div>
              
              {% if theme_config.global.product_quantity or theme_config.global.product_quantity  == nil %}
                <div class="control-product_detail-quantity_box">
                  <div class="cell-item">
                      <span class="product-sku-name">{{lang.cart.list.quantity}}</span>
                  </div>
                  <div class="cell-item" style="margin-top: 10px !important;">
                      <div class="product-calculator" id='mo-quantity'>
                          <div class="product-calculator-handle" data-type='reduce'>
                              {% include icon_minus ,{width:'16',height:'16'} %}
                          </div>

                          <input class="product-calculator-value notranslate"  min="1" type="number" value="{{theme_config.global.product_quantity_number | default:1}}"/>
                          <div class="product-calculator-handle" data-type='add'>
                              {% include icon_plus ,{width:'16',height:'16'} %}
                          </div>
                      </div>
                  </div>
                </div>
              {% endif %}
              <div class="plugin-product_detail-buy_top"  data-product-id="{{product_detail.id}}"></div>
              <div class="cell-item control-product_detail-button">
                {% assign product_shopping_btn = theme_config.global.product_shopping_btn | default :'show' %}
               
                {%- if product_shopping_btn != 'hide' -%}
                    {% if product_detail.status == 1 %}
                      {% if product_detail.available == 1 %}
                        <div class="product-btns product-cart-group">
                          {% if product_shopping_btn == 'add' or product_shopping_btn == 'show' %}
                          <div class="secondary_btn product-cart control-product_detail-cart" data-type="cart" data-plug="cart" id='add-cart-{{ product_detail.id }}'>{{lang.product.add_to_cart}}</div>
                          {% endif %}
                          {% if product_shopping_btn == 'show'  %}
                          <div class="divider"></div>
                          {% endif %}

                          {% if product_shopping_btn == 'buy' or product_shopping_btn == 'show'  %}
                          <div class="main_btn product-now control-product_detail-buy" data-type="buyNow" data-plug="buy_now" id="buynow-{{ product_detail.id }}">{{lang.product.buy_it_now}}</div>
                          {% endif %}
                        </div>
                        <div class="product-btns product-out-of-stock" style="display: none;" >
                          <div class="mo-btn mo-btn-default mo-btn-disable mo-btn-plan mo-btn-max mo-btn-block" >{{lang.account.wishlist.product_offline}}</div>
                        </div>
                      {% else %}
                        <div class="product-btns product-out-of-stock">
                          <div class="mo-btn mo-btn-default mo-btn-disable mo-btn-plan mo-btn-max mo-btn-block" >{{lang.product.out_of_stock}}</div>
                        </div>
                      {% endif %}

                      {% else %}
                        {% if storeConfig.product_put_off_control == 'buy' or storeConfig.product_put_off_control == '404' %}
                          {% if product_detail.available == 1 %}
                            <div class="product-btns product-cart-group">
                              {% if product_shopping_btn == 'add' or product_shopping_btn == 'show' %}
                              <div class="secondary_btn product-cart control-product_detail-cart" data-type="cart" data-plug="cart" id='add-cart-{{ product_detail.id }}'>{{lang.product.add_to_cart}}</div>
                              {% endif %}
                              {% if product_shopping_btn == 'show'  %}
                              <div class="divider"></div>
                              {% endif %}
                              {% if product_shopping_btn == 'buy' or product_shopping_btn == 'show'  %}
                              <div class="main_btn product-now control-product_detail-buy" data-type="buyNow" data-plug="buy_now" id="buynow-{{ product_detail.id }}">{{lang.product.buy_it_now}}</div>
                              {% endif %}
                            </div>
                            {% else %}
                            <div class="mo-btn mo-btn-default mo-btn-disable mo-btn-plan mo-btn-max mo-btn-block" >{{lang.product.out_of_stock}}</div>
                          {% endif %}
                        {% endif %}

                        {% if storeConfig.product_put_off_control == 'visible' %}
                          <div class="product-btns product-out-of-stock">
                            <div class="mo-btn mo-btn-default mo-btn-disable mo-btn-plan mo-btn-max mo-btn-block" >{{lang.account.wishlist.product_offline}}</div>
                          </div>
                        {% endif %}

                        {% comment %} 兼容老数据 {% endcomment %}
                        {% unless storeConfig.product_put_off_control %}
                          {% if product_detail.available == 1 %}
                              <div class="product-btns product-cart-group">
                                {% if product_shopping_btn == 'add' or product_shopping_btn == 'show' %}
                                <div class="secondary_btn product-cart control-product_detail-cart" data-type="cart" data-plug="cart" id='add-cart-{{ product_detail.id }}'>{{lang.product.add_to_cart}}</div>
                                {% endif %}
                                {% if product_shopping_btn == 'show'  %}
                                <div class="divider"></div>
                                {% endif %}
                                {% if product_shopping_btn == 'buy' or product_shopping_btn == 'show'  %}
                                <div class="main_btn product-now control-product_detail-buy" data-type="buyNow" data-plug="buy_now" id="buynow-{{ product_detail.id }}">{{lang.product.buy_it_now}}</div>
                                {% endif %}
                              </div>
                              {% else %}
                              <div class="mo-btn mo-btn-default mo-btn-disable mo-btn-plan mo-btn-max mo-btn-block" >{{lang.product.out_of_stock}}</div>
                          {% endif %}
                        {% endunless %}
                        
                    {% endif %}
                {% endif %}
                <div class="product-btns product-out-of-delete" style="display: none;">
                  <div class="mo-btn mo-btn-default mo-btn-disable mo-btn-plan mo-btn-max mo-btn-block" >{{lang.account.wishlist.product_offline}}</div>
                </div>
                 
              </div>

              {% comment %} {% if section.settings.whatsapp.whatsapp_show == 2 %}
                <div  style='margin-top:20px'>
                  <a class="main_btn mo-btn-block" target="_blank" id="whatsapp-btn" href="" style="background:#25D366;color:#fff">
                    <svg t="1695369412993" class="icon" style="margin-right:6px;"  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6012" width="26" height="26"><path d="M320.512 514.858667C306.090667 488.661333 298.666667 464.128 298.666667 441.258667c0-25.898667 6.954667-47.701333 20.48-66.730667a124.416 124.416 0 0 1 14.208-16.64l2.005333-2.133333 0.341333-0.384-0.384 0.426666 0.554667-0.597333A42.624 42.624 0 0 1 366.592 341.333333c8.789333 0 14.72 0.085333 19.968 0.341334h1.962667c11.349333 0 17.322667 3.754667 23.637333 16.554666l0.725333 1.578667v0.042667l0.853334 1.834666 13.952 32.768c11.008 25.898667 16.298667 38.144 17.493333 40.533334 4.224 8.149333 4.522667 14.634667 0.853333 21.717333l-1.493333 2.901333-1.664 3.2a52.266667 52.266667 0 0 1-7.808 11.392l-5.12 6.016c-4.266667 5.034667-6.357333 7.381333-8.106667 9.258667l-10.154666 10.666667 7.893333 12.416c14.677333 23.04 32.426667 44.245333 52.309333 61.397333 16.426667 14.208 33.28 25.6 51.2 34.858667 6.485333 3.328 19.413333 9.130667 29.44 13.397333l12.16 5.205333 8.832-9.941333c12.032-13.44 24.32-28.202667 28.885334-34.773333 7.253333-10.581333 13.354667-12.032 28.416-6.698667 6.826667 2.389333 41.984 18.602667 70.656 32.469333 3.242667 1.578667 3.242667 1.578667 8.32 3.925334 3.114667 1.493333 4.949333 2.432 6.613333 3.413333 3.413333 2.048 5.248 3.754667 6.656 5.973333 4.181333 6.741333 2.688 29.013333-5.546667 51.370667-7.722667 20.906667-44.970667 46.165333-73.002666 50.176-24.661333 3.584-45.568 2.432-66.688-4.053333-22.912-7.04-39.168-12.8-58.965334-21.077334-34.986667-14.634667-68.949333-36.864-101.717333-66.304a509.909333 509.909333 0 0 1-70.272-77.781333 624.213333 624.213333 0 0 1-5.418667-7.253333 245.546667 245.546667 0 0 1-20.949333-32z m-130.986667 319.530666l131.498667-39.466666a341.333333 341.333333 0 1 0-92.032-92.074667l-39.466667 131.541333z m-53.12-119.808A424.789333 424.789333 0 0 1 85.333333 512C85.333333 276.352 276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667a424.789333 424.789333 0 0 1-202.666667-51.114667l-163.584 49.066667a46.933333 46.933333 0 0 1-58.453333-58.453334l49.066667-163.584z" fill="#ffffff" p-id="6013"></path></svg>
                    {{section.settings.whatsapp.whatsapp_btn_label}}
                  </a>
                </div>
              {% endif %} {% endcomment %}
  
              {% if payment %}
                {% if product_detail.status == 1 %}
                  {% if product_detail.available == 1 %}
                    <div class="cell-item product-payment-box" style="margin-top:20px">
                        {% include product_payment_paypalcheckout , { pay_block_id:block_id } %}
                    </div>
                  {% endif %}
                
                {% else %}
                {% if storeConfig.product_put_off_control == 'buy' or storeConfig.product_put_off_control == '404' %}
                 {% if product_detail.available == 1 %}
                    <div class="cell-item product-payment-box" style="margin-top:20px">
                        {% include product_payment_paypalcheckout , { pay_block_id:block_id } %}
                    </div>
                 {% endif %}
                {% endif %}

                {% comment %} 兼容老数据 {% endcomment %}
                {% unless storeConfig.product_put_off_control %}
                  {% if product_detail.available == 1 %}
                    <div class="cell-item product-payment-box" style="margin-top:20px">
                        {% include product_payment_paypalcheckout , { pay_block_id:block_id } %}
                    </div>
                  {% endif %}
                {% endunless %}
                
                {% endif %}
              {% endif %}

              <div class="plugin-product_detail-buy_bottom"  data-product-id="{{product_detail.id}}"></div>
              {%- if section.settings.content -%}
              <div class="cell-item mo-editor-reset" style="margin-top:20px">
                  {{ section.settings.content|pubic_front_imgcdn_replace|html_content_filter }}
              </div>
              {%- endif -%}
            <div class="plugin-product_detail-buy_describe_bottom"  data-product-id="{{product_detail.id}}"></div>

          </div>
      
          </div>
      </div>
      <div class="product-tabs-card" >
        <div class="plugin-product_detail-tabs_top"  data-product-id="{{product_detail.id}}"  data-block-id="{{block_id}}"></div>
        {% assign tabs_type = section.settings.detail_type %}
        {% if section.settings.position == "right" %}
          {% assign tabs_type = "accordion" %}
        {% endif %}
        {% include 'product_tabs', tabs_type:tabs_type %}
        <div class="plugin-product_detail-tabs_bottom"  data-product-id="{{product_detail.id}}"  data-block-id="{{block_id}}"></div>
        {% include 'product_share_svg' %}
      </div>
  </div>
  <div class="plugin-container-footer"></div>


  <div class="back-box">
      <a href="javascript:history.back();">
          <svg t="1642570712144" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="24369" width="24" height="24"><path d="M85.333333 512.042667l320-256v213.333333H1024v85.333333H405.333333v213.333334z" p-id="24370"></path></svg>
          <span>{{lang.general.back}}</span>
      </a>
  </div>


</div>

{% include comment %}
<script type="text/x-template" id="id-comment-empty">
{% include "empty" ,text:lang.comments.no_comments, icon:"comment" %}
</script>


<script type="text/javascript">
  moi.setPageStorage('product_detail', oemcart_product);
$(function(){
  var backBtn = "{{section.settings.back_btn}}";
  if(document.referrer === "" || backBtn == 'hide' ){
      $(".back-box").hide()
  }

  var productDetail = new shopProduct({
      product:oemcart_product,
      productOptionType:'{{ section.settings.product_option_type |  default:"global" }}',

      data_from:'{{ detail_data_from }}',
      ec_currency_code: '{{ base_currency.standard_code }}',
      id:'#sku-option-{{ block_id | default : section.block_id }}',
      block_id:"{{block_id}}",
      isMainProduct:true,
      wishlist:".wishlist-box",
      {% if theme_config.global.product_quantity == true %}
      quantity:{{theme_config.global.product_quantity_number | default:1}},
      {% endif %}
      {% comment %} changeOption:function(params){
        var whatsappBtn = $("#whatsapp-btn");
        var whatsapp_name = "{{section.settings.whatsapp.whatsapp_name}}";
        var whatsapp_btn_href = `{{section.settings.whatsapp.whatsapp_btn_href}}`;
        if (whatsappBtn.length) {
          var whatsappHref = whatsappBtn.attr("href");
          var text = encodeURIComponent(whatsapp_btn_href.replace("{product_title}",params.productTitle).replace("{product_price}",formatMoney(params.price, oemcart_currency)).replace("{product_url}",location.href));
          whatsappBtn.attr("href",`https://api.whatsapp.com/send?phone=${whatsapp_name}&text=${text}`)
        }
      } {% endcomment %}
  })

  window.cuurentProductDetail = productDetail;
  
  //PayPal payment callback succeeded
  moi.addEvent('paypalec_callback', function (event) {
      if(event.params.payId === '{{block_id}}'){
          productDetail.callbackAddToCart();
      }
  })

  moi.quantity({
      dom: $("#product_detail #mo-quantity"),
      change(val) {
          productDetail.setSelectedVal({quantity:val.value,changeType:"quantity" });
      }
  })
  

  $("#add-cart-{{ product_detail.id }}").click(function () {

      if(!productDetail.verifyOption("cart")){
           return false
      }
      moi.addEvent('addCart', function (event) {
          productDetail.cartLayer();
      },true)

      var load = moi.nodeShowLoading(this, "mo-loading-black")
      productDetail.addCart(function () {load.close();}, function (data) {
          if (!data.code) {
              let ids = '';
              if (oemcart_product.collections.length) {
                  ids = oemcart_product.collections.map((item) => item.collection_id).join(",")
              }
              moi.onEvent("addCart",{
                  product_id: productDetail.product.id,
                  collection_id: ids
              })
          } else {
              return moi.alert({
                  title: data.msg
              });
          }
      })

  })

  $("#buynow-{{ product_detail.id }}").click(function () {

      if(!productDetail.verifyOption('buy')){
           return false
      }
      var load = moi.nodeShowLoading(this)

      productDetail.buynow(function () { load.close(); }, function (ret) {
          if (!ret.code) {
                  window.location.href = ret.data.checkout_url 
              } else {
                  return moi.alert({
                      title: ret.msg
                  });
              }
      })
  })

  })
</script>

{% schema %}
{
  "tag": "",
  "class": "product_detail",
  "is_global": false,
  "name": {
    "zh_CN": "商品详情",
    "en_US": "Product details"
  },
  "max_blocks": "0",
  "settings": [
    {
      "type": "card_header",
      "label": {
        "zh_CN": "元素展示",
        "en_US": "Element display"
      }
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "facebook",
        "en_US": "Facebook"
      },
      "default": true,
      "id": "is_facebook"
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "twitter",
        "en_US": "Twitter"
      },
      "default": true,
      "id": "is_twitter"
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "Pinterest",
        "en_US": "Pinterest"
      },
      "default": true,
      "id": "is_pinterest"
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "Facebook Dialog",
        "en_US": "Facebook Dialog"
      },
      "default": true,
      "id": "is_dialog"
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "vk",
        "en_US": "Vk"
      },
      "default": true,
      "id": "is_vk"
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "linkedin",
        "en_US": "Linkedin"
      },
      "default": true,
      "id": "is_linkedin"
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "line",
        "en_US": "Line"
      },
      "default": true,
      "id": "is_line"
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "tumblr",
        "en_US": "Tumblr"
      },
      "default": true,
      "id": "is_tumblr"
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "whatsapp",
        "en_US": "Whatsapp"
      },
      "default": true,
      "id": "is_whatsapp"
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "PC端面包屑",
        "en_US": "PC End Breadcrumbs"
      },
      "default": true,
      "id": "bread_crumbs"
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "移动端面包屑",
        "en_US": "Mobile End Breadcrumbs"
      },
      "default": false,
      "id": "mobile_bread_crumbs"
    },
    {
      "type": "card_switch",
      "label": {
        "zh_CN": "打开菜单",
        "en_US": "Open menu"
      },
      "default": false,
      "id": "tabs_open_all"
    },
    {
      "type": "card_select",
      "id": "back_btn",
      "label": {
        "zh_CN": "返回按钮控制",
        "en_US": "Back button control"
      },
      "option": [
        {
          "label": {
            "zh_CN": "显示",
            "en_US": "Display"
          },
          "value": "show"
        },
        {
          "label": {
            "zh_CN": "不显示",
            "en_US": "Do not show"
          },
          "value": "hide"
        }
      ],
      "default": "show"
    },
    {
      "type": "card_select",
      "label": {
        "zh_CN": "图片展示形式",
        "en_US": "Image display form"
      },
      "id": "image_type",
      "option": [
        {
          "label": {
            "zh_CN": "向下平铺",
            "en_US": "Tiling down"
          },
          "value": "tiledown"
        },
        {
          "label": {
            "zh_CN": "向下大小平铺",
            "en_US": "Tiling down size"
          },
          "value": "bigtiledown"
        },
        {
          "label": {
            "zh_CN": "2列向下平铺",
            "en_US": "2 columns tile downward"
          },
          "value": "img2tiledown"
        },
        {
          "label": {
            "zh_CN": "小图居下",
            "en_US": "Small image down"
          },
          "value": "bottom"
        },
        {
          "label": {
            "zh_CN": "小图居右",
            "en_US": "Small image on the right"
          },
          "value": "right"
        },
        {
          "label": {
            "zh_CN": "小图居左",
            "en_US": "Small image on the left"
          },
          "value": "left"
        }
      ],
      "default": "bottom"
    },
    {
      "type": "card_select",
      "label": {
        "zh_CN": "移动端缩略图",
        "en_US": "Mobile thumbnails"
      },
      "default": "hide",
      "id": "mobile_thumbnail",
      "option": [
        {
          "label": {
            "zh_CN": "不显示",
            "en_US": "Do not show"
          },
          "value": "hide"
        },
        {
          "label": {
            "zh_CN": "显示",
            "en_US": "Show"
          },
          "value": "show"
        }
      ]
    },
    {
      "type": "card_input_number",
      "max": 200000,
      "min": 0,
      "id": "img_radius",
      "label": {
        "zh_CN": "图片圆角",
        "en_US": "Picture rounding"
      },
      "info": {
				"zh_CN": "内容宽度单位px",
        "en_US": "Content width unit px"
			},
      "default": 0
    },
    {
      "type": "card_select",
      "id": "position",
      "label": {
        "zh_CN": "详情位置",
        "en_US": "Detail location"
      },
      "option": [
        {
          "label": {
            "zh_CN": "下",
            "en_US": "Down"
          },
          "value": "bottom"
        },
        {
          "label": {
            "zh_CN": "右",
            "en_US": "Right"
          },
          "value": "right"
        }
      ],
      "default": "bottom"
    },
    {
			"type": "card_select",
			"label": {
				"zh_CN": "PC端详情描述",
				"en_US": "PC detailed description"
			},
			"default": "tab",
			"id": "detail_type",
			"option": [
				{
					"label": {
						"zh_CN": "选项卡",
						"en_US": "Tab"
					},
					"value": "tab"
				},
				{
					"label": {
						"zh_CN": "手风琴",
						"en_US": "Accordion"
					},
					"value": "accordion"
				}
			]
		},
    {
      "type": "card_select",
      "label": {
        "zh_CN": "详情页商品属性样式",
        "en_US": "Product property style"
      },
      "default": "global",
      "id": "product_option_type",
      "option": [
        {
          "label": {
            "zh_CN": "跟随全局配置",
            "en_US": "Follow the global"
          },
          "value": "global"
        },
        {
          "label": {
            "zh_CN": "默认",
            "en_US": "Default"
          },
          "value": "default"
        },
        {
          "label": {
            "zh_CN": "下拉框",
            "en_US": "Drop down box"
          },
          "value": "select"
        },
        {
          "label": {
            "zh_CN": "变体列表",
            "en_US": "Show all"
          },
          "value": "all"
        },
        {
          "label": {
            "zh_CN": "批量加购",
            "en_US": "Buy in bulk"
          },
          "value": "multiple"
        }
      ],
      "info": {
        "zh_CN": "\"批量加购\"样式下，勿安装\"商品自定义属性\"应用",
        "en_US": "\"Buy in bulk\" style Do not install \"Product custom attribute\" application"
      }
    },
    {
      "type": "card_text_editor",
      "label": {
        "zh_CN": "其他内容",
        "en_US": "Other content"
      },
      "id": "content"
    }
  ],
  "blocks": [],
  "default": {
    "settings": {
      "tabs_open_all":false,
      "is_facebook": true,
      "is_twitter": true,
      "is_pinterest": true,
      "bread_crumbs": true,
      "mobile_bread_crumbs": false,
      "is_dialog": true,
      "is_vk": true,
      "is_tumblr": true,
      "position": "bottom",
      "is_linkedin": true,
      "is_whatsapp": true,
      "is_line": true,
      "back_btn": "show",
			"detail_type": "tab",
      "product_option_type":"global",
      "template": "2",
      "whatsapp":{
        "whatsapp_show":1,
        "whatsapp_name":"",
        "whatsapp_btn_label":"Chat on WhatsAPP",
        "whatsapp_btn_href":"Hello, I want to buy this product:\n*{product_title}*\n*Price: {product_price}*\n*{product_url}*\nCan I get a extra discount? Thank you!"
      },
      "content": "",
      "image_type": "bottom",
      "mobile_thumbnail": "hide",
      "img_radius": 0
    },
    "blocks": []
  }
}
{% endschema %}